import xlrd

data = xlrd.open_workbook('都昌二中2019下期中考.xls')

def setTable(name):
    global table
    table = data.sheet_by_name(name)

Number = 0
Name = 1
Class = 2
totScore = 3
stdScore = 4
classRank = 5
schoolRank = 6

Chinese = 7
Math = 10
English = 13
Physics = 16
Chem = 19
Biolo = 22

def getCell(x,y):
    return table.cell(x, y).value

def writeFile(filePath, content):
    print('Write info to file:Start...')
    # 将文件内容写到文件中
    with open(filePath, 'a', encoding='utf-8') as f:
        f.write(content)
        print('Write info to file:end...')

def readFile(filepath):
    f=open(filepath,'r')
    return f.read()